package com.zk.shop.util;

import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class RespUtil {

    /**
     * 三种方式返回数据
     * @param code
     * @param message
     * @param success
     * @param pojo
     * @return
     */
    public Result JOK(String code,String message,boolean success,Object pojo){
        return new Result(code,message,success,pojo);
    }
    public Result LOK(String code, String message, boolean success, List objList){
        return new Result(code,message,success,objList);
    }
    public Result MOK(String code, String message, boolean success){
        return new Result(code,message,success);
    }
    public Result POK(String code, String message, boolean success, PageInfo pageInfo){
        return new Result(code,message,success,pageInfo);
    }

}
